package com.sunlee.common.service.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sunlee.common.core.entity.PageData;
import com.sunlee.common.core.service.BaseService;


import java.util.List;
import java.util.Map;

/**
 * CRUD基础服务接口
 *
 * @author sunlee
 */
public interface CrudService<T, D> extends BaseService<T>, IService<T> {

    PageData<D> pageOwn(Map<String, Object> params);

    List<D> listOwn(Map<String, Object> params);

    LambdaQueryWrapper<T> getWrapper(Map<String, Object> params);

    D getOwn(Long id);

    void saveOwn(D dto);

    void updateOwn(D dto);

    void deleteOwn(Long[] ids);

    T getOneOwn(Wrapper<T> queryWrapper);
}